package com.xqboss.apps.dto.punch;

import com.xqboss.apps.domain.punch.PunchWeakenConfig;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.PositiveOrZero;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author Trent
 * @date 2023/9/11
 */
@Data
@ApiModel
public class EditPunchConfigDto {

    @ApiModelProperty("日打卡收益上限")
    @Positive(message = "日打卡收益上限只能为正数")
    private BigDecimal dayIncomeMax;

    @ApiModelProperty(value = "收益折算系数", required = true)
    @NotNull(message = "请输入收益折算系数")
    @Positive(message = "收益折算系数错误")
    private BigDecimal incomeRatio;

    @ApiModelProperty(value = "耐久度倍数", required = true)
    @NotNull(message = "请输入耐久度倍数")
    @Positive(message = "耐久度倍数错误")
    private BigDecimal durabilityRate;

    @ApiModelProperty(value = "破损值倍数", required = true)
    @NotNull(message = "请输入破损值倍数")
    @Positive(message = "破损值倍数错误")
    private BigDecimal breakageRate;

    @ApiModelProperty(value = "耐久消耗系数", required = true)
    @NotNull(message = "请输入耐久消耗系数")
    @Positive(message = "耐久消耗系数错误")
    private BigDecimal durabilityUseRatio;

    @ApiModelProperty(value = "耐久维修系数(热豆)", required = true)
    @NotNull(message = "请输入耐久维修系数(热豆)")
    @PositiveOrZero(message = "耐久维修系数错误(热豆)")
    private BigDecimal durabilityRepairsRatio;

    @ApiModelProperty(value = "耐久维修系数(扳手)", required = true)
    @NotNull(message = "请输入耐久维修系数(扳手)")
    @PositiveOrZero(message = "耐久维修系数错误(扳手)")
    private BigDecimal durabilityRepairsRatioWrench;

    @ApiModelProperty(value = "维修消耗等级(扳手)", required = true)
    @NotNull(message = "请输入维修消耗等级(扳手)")
    @Positive(message = "维修消耗等级(扳手)错误")
    private Integer repairsLevelWrench;

    @ApiModelProperty(value = "消耗破损值", required = true)
    @NotNull(message = "请输入消耗破损值")
    @Positive(message = "消耗破损值错误")
    private BigDecimal breakageUse;

    @ApiModelProperty(value = "收益递减", required = true)
    @NotNull(message = "请输入收益递减")
    @Valid
    private List<PunchWeakenConfig> weakenConfigs;

}
